package com.yueyang.sojourn.server.validation.annotation;

import com.yueyang.sojourn.server.validation.CardNoValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Retention(RetentionPolicy.RUNTIME)
//element.type 注解用于类
@Target(ElementType.TYPE)
@Documented
@Constraint(validatedBy= CardNoValidator.class)
//@Repeatable(LinkVals.class)(可重复注解同一字段，或者类，java1.8后支持）
public @interface CardNoValid {
    String message() default "证件号码校验错误";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default{};
}
